package course.com.itheima3;

public class Demo {
    public static void main(String[] args) {
        InterImpl inter = new InterImpl();
        inter.show();

        Inter i =new Inter(){
            @Override
            public void show() {
                System.out.println("show方法执行了");
            }
        };



        goSwimming(new Inter() {
            @Override
            public void show() {
                System.out.println("去游泳吧");
            }

        });

        goSwimming(()->{
            System.out.println("show方法执行了2");
        });
    }

    public static void goSwimming(Inter inter){
        inter.show();
    }
}
